/**
 * @Date 2023-02-11 11:29:13
 * @Remark
 */

// =======================================================================

export const API_CODE: Api = {
  title: "「系统」用户登录验证码",
  path: "captcha",
  method: "GET",
  controller: "后台用户接口",
};
export const API_LOGIN: Api = {
  title: "「系统」用户登录",
  path: "login",
  method: "POST",
  controller: "后台用户接口",
};

// req
export interface ReqLogin {
  userName: string;
  password: string;
  captcha: string;
  validateCode:string
}

// res
export interface ResLogin extends Res {
  data: {
    authorization: string;
    user: Account;
  };
}
// ---------------
export const API_REGISTER: Api = {
  title: "读者注册",
  path: "user/register",
  method: "POST",
};
export interface ReqRegister{
  idCard: string;
  userName: string;
  fullName: string;
  email: string;
  phone: string;
  password:string
}

// =======================================================================

export const API_LOGOUT: Api = {
  title: "「系统」用户退出",
  path: "logout",
  method: "GET",
};
// =======================================================================

export const API_UPDATE_PASS: Api = {
  title: "「系统」用户修改密码",
  path: "admin/updatePwd",
  method: "POST",
};
export const API_UPDATE_USER_PASS: Api = {
  title: "「系统」用户修改密码",
  path: "user/updatePwd",
  method: "POST",
};
export interface ReqUpdatePass {
  newPwd: string;
  oldPwd: string;
}
// =======================================================================

export const API_UPDATE_INFO: Api = {
  title: "「系统」用户修改信息",
  path: "user/update_info",
  method: "POST",
};

export interface ReqUpdateInfo {
  userName: string;
  idNumber: string;
  genderDictionariesId: string;
  birthDate: string;
  educationDictionariesId: string;
  politicalAppearanceDictionariesId: string;
  avatar: string;
}
